from django.urls import re_path,path,register_converter
# from utils.converters import *
from rest_framework.routers import SimpleRouter

from user.views.user_views import *
from user.views.userinfo_view import *
from rest_framework_jwt.views import obtain_jwt_token
# register_converter(UsernameConverter, 'username')
# register_converter(MobileConverter, 'mobile')


urlpatterns = [
        re_path(r'^sms_codes/(?P<mobile>1[3-9]\d{9})/$',CodeView.as_view()),
        path('users/',RegisterView.as_view({'post':'create'})),
        # path('authorizations/',views.LoginView.as_view()),
        path('authorizations/',obtain_jwt_token),
        path('user/',UserInfoViewSet.as_view()),
        path('upload/avatar/',UploadAvtarView.as_view()),
]

